package com.ctakit.kiwi.web.view.resolver;

import lombok.Data;
import org.springframework.util.Assert;
import org.springframework.web.servlet.View;
import org.springframework.web.servlet.ViewResolver;

import java.util.Locale;

/**
 * @author lizhenmin
 */
@Data
public class JsonViewResolver implements ViewResolver {
    private View jsonView;

    @Override
    public View resolveViewName(String viewName, Locale locale) {
        Assert.notNull(jsonView, "'jsonView' must not be null");
        return jsonView;
    }

}
